using System;
using System.Drawing;

using Jeffrey.XFramework;
using Jeffrey.XFramework.XCrawl;

namespace Jeffrey.XProcess
{
    public class PostFetchImages : PostFetcher
    {
        private static readonly Int32 s_Size = 0xC800; //50k

        public PostFetchImages(String name, String description, String classname, String path)
            : base(name, description, classname, path, null) { }
        public PostFetchImages(String name, String description, String classname, String path, Filter filter)
            : base(name, description, classname, path, filter) { }

        protected override void PostFetch(CrawlUri curi)
        {
            if (curi != null)
            {
                if (curi.Content.Length < s_Size)
                {
                    curi.Content = String.Empty;
                }
            }
            else
                return;
        }
    }
}
